Methods and systems for state switching

ABSTRACT

Disclosed are methods and systems for state switching. The method is applied to a first hardware system. The first hardware system is connected with a second hardware system. The first hardware system has a first operation state and a second operation state. The second hardware system includes a memory unit. The memory unit has a first access state and a second access state. The memory unit is in the first access state currently. The method includes: the first hardware system sends an access state switching instruction to the second hardware system when the first hardware system enters the second operation state from the first operation state, wherein, the access state switching instruction is adapted to switch the memory unit of the second hardware system from the first access state to the second access state. The application of the present invention can ensure the security of key data, avoid the access of key data by malicious software, reduce the implementation costs and has a higher extensibility.

FIELD OF INVENTION

Embodiments of the present invention relate to computer data processing fields, in particular to methods and systems for state switching.

BACKGROUND OF INVENTION

Presently, with wide application of computers, some password hash values, random, keys, and the like often need to be saved in a computer system. Conventionally, these values are saved in a complementary metal-oxide-semiconductor random access memory (CMOS RAM) in a computer, a flash memory of a basic input/output system (BIOS Flash ROM) or a hard driver. These storage medium have no access limitation in an operating system, and have lower security.

In order to improve the security of key data such as passwords or keys, there is an independent EEPROM having a security protection function in the art to realize the access of the data. For example, Thinker Centre® and Think Pad® embed a specific chip AssetID in the system in order to improve the security level of key data. This chip may set an access control on the interior data, and set a storage limitation on the data block in this chip using BIOS, before entering the operating system. Accordingly, arbitrarily reading key data in the operating system can be avoided.

In the above scheme, a specific EEPROM having a security protection function must be used, though the storage security of key data is ensured, implementation costs will be increased.

SUMMARY OF INVENTION

Embodiments of the present invention provide methods and systems for state switching which may ensure the data security and reduce implementation costs, and have a higher extensibility.

An embodiment of the present invention provides a method for state switching which is applied for a first hardware system, wherein the first hardware system is connected with a second hardware system, the first hardware system has a first operation state and a second operation state, the second hardware system comprises a memory unit, the memory unit has a first access state and a second access state, the memory unit is in the first access state currently, the method includes:

sending an access state switching instruction to the second hardware system, when the first hardware system entering the second operation state from the first operation state;

wherein the access state switching instruction is adapted to switch the memory unit of the second hardware system from the first access state to the second access state.

The first operation state of the first hardware system includes an initial stage, and the second operation state includes an applying stage; or the first operation state of the first hardware system includes the applying stage, and the second operation state includes the initial stage.

The first access state includes an un-protected state, and the second access state includes a protected state; or the first access state includes the protected state, and the second access state includes the un-protected state.

An embodiment of the present invention further provides a method for state switching which is applied for a second hardware system, wherein the second hardware system is connected with a first hardware system, the second hardware system includes a memory unit, the memory unit has a first access state and a second access state, the memory unit is in the first access state currently, the method includes:

receiving, by the second hardware system, an access state switching instruction from the first hardware system, and switching the memory unit of the second hardware system from the first operation state to the second operation state;

wherein the access state switching instruction received by the second hardware system is sent by the first hardware system when the first hardware system enters the second access state from the first access state.

The first access state includes an un-protected state, and the second access state includes a protected state; or the first access state includes the protected state, and the second access state includes the un-protected state.

The first operation state of the first hardware system includes an initial stage, and the second operation state includes an applying stage; or the first operation state of the first hardware system includes the applying stage, and the second operation state includes the initial stage.

The method further includes:

receiving, by the second hardware system, an access request for reading/writing the memory unit from the first hardware system;

identifying an access state of the memory unit;

performing an operation on the memory unit according to the received access request and returning an operation result, if the memory unit being in a readable and writable state; rejecting to perform the access request and returning an error result, if the memory unit being in unreadable and unwritable state.

An embodiment of the present invention further provides a first hardware system connected to a second hardware system, wherein, the first hardware system has a first operation state and a second operation state, the second hardware system includes a memory unit, the memory unit has a first access state and a second access state, the memory unit is in the first access state currently, the first hardware system includes:

a state detecting unit adapted to generate a detection result when the first hardware system entering the second operation state from the first operation state;

an instruction sending unit connected with the state detecting unit, and adapted to send an access state switching instruction to the second hardware system according to the detection result,

The access state switching instruction is adapted to switch the memory unit of the second hardware system from the first access state to the second access state.

The memory unit included in the second hardware system is a portion of a data storage area in the second hardware system.

An embodiment of the present invention further provides a second hardware system connected to a first hardware system, the second hardware system includes a memory unit, the memory unit has a first access state and a second access state, the second hardware system includes:

a state converting unit adapted to switch the memory unit of the second hardware system from the first access state to the second access state;

an instruction receiving unit adapted to receive an access state switching instruction from the first hardware system, and notify the state converting unit of the received state switching instruction;

wherein the access state switching instruction received by the second hardware system is sent by the first hardware system when the first hardware system entering the second operation state from the first operation state.

The second hardware system further includes:

an access request receiving unit adapted to receive an access request for reading/writing the memory unit from the first hardware system;

a state identifying unit adapted to identify the access state of the memory unit, and output an identification result,

-   -   a feedback performing unit connected with the state identifying         unit, and adapted to perform an operation on the memory unit         according to the received access request and return an operation         result when the identification result being a readable and         writable state; and reject to perform the access request and         return an error information when the identification result being         unreadable and unwritable state.

The memory included in the second hardware system is a portion of a built-in or built out data storage area in the second hardware system.

BRIEF DESCRIPTION OF THE DRAWINGS

In the following, the drawings used in the embodiments will be simply described, in order to explain the embodiments of the present invention clearly. Obviously, the following drawings are only some embodiments of the present invention. For one skilled in the art, every other drawing will be obtained according to these drawings without inventive labor.

FIG. 1 illustratively shows a flowchart of a method for state switching according to an embodiment of the present invention;

FIG. 2 illustratively shows a flowchart of a further method for state switching according to an embodiment of the present invention;

FIG. 3 shows a schematic diagram of state switching of a specific example;

FIG. 4 is a structure schematic diagram of a state switching apparatus according to a third embodiment of the present invention; and

FIG. 5 is a structure schematic diagram of a state switching apparatus according to a third embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The solutions of embodiments of the present invention will be clearly and completely described from the following detailed description taken conjunction with the drawings. Obviously, the described embodiments are only a portion of embodiments of the present invention, rather than all embodiments. Based on embodiments in the present invention, every other embodiment obtained by one skilled in the art without inventive labors belongs to the protection scope of the present invention.

Referring to FIG. 1, a flowchart of a method for state switching according to an embodiment of the present invention is shown. This embodiment is applied for a first hardware system, the first hardware system is connected with a second hardware system, the first hardware system has a first operation state and a second operation state, the second hardware system comprises a memory unit, the memory unit has a first access state and a second access state, the memory unit is at the first access state currently, the flowchart as shown in FIG. 1 particularly includes the following steps.

In step 101, the first hardware system enters the second operation state from the first operation state;

In step 102, the first hardware system sends an access state switching state to the second hardware system.

The access state switching instruction is adapted to switch the memory unit of the second hardware system from the first access state to the second access state.

It should be noted that, the first operation state of the first hardware system may be an initial stage, and the second operation state may be an applying stage. Or the first operation state of the first hardware system may be the applying stage, and the second operation state may be the initial stage.

For the initial stage, particularly, a system state such as hardware power on, hardware initialization, software system initialization inside a device, firmware user interaction is included.

For the applying stage, particularly, a series of state such as loading of the operating system, running of the operating system, running of a client application program are included.

It should be noted that, the first access state may be an un-protected state, and the second access state may be a protected state. Or, the first access state may be the protected state, and the second access state may be the un-protected state. Here, the protected state refers to an unreadable and unwritable state or a readable and unwritable state, or an unreadable and writable state. The un-protected state refers to readable and writable state.

For example, the first access state of the memory unit of the second hardware system may be the readable and writable state, and the second access state may be the unreadable and unwritable state or the readable and unwritable state, or the unreadable and writable state, when the first operation state of the first hardware system is the initial stage, and the second operation state is the applying stage.

As another example, the first access state of the memory unit of the second hardware system may be the unreadable and unwritable state or the readable and unwritable state, or the unreadable and writable state, and the second access state may be the readable and writable state, when the first operation state of the first hardware system is the applying stage, and the second operation state is the initial stage

It should be noted that, the above access state switching instruction may a command, and also a signal.

It should be noted that, the above first hardware system may be connected with the second hardware system through a data passage. Particularly, the data channel may be any existing channel which can transmit data, for example, communication network (such as LAN), I2C channel, LPC (Low Pin Count), PCI (Peripheral Component Interconnect) bus, ISA (Industrial Standard Architecture), SPI (Serial Peripheral Interface) bus and the like.

It should be noted that, the above first hardware system and second hardware system are two different electronic device respectively. For example, the first hardware system may at least have a mainboard, a CPU, a data storage area, and an electronic device of an application program used to interact with a user. The second hardware system may be an embedded system which at least comprises a portion of a built-in or built-out data storage area. The memory unit in the second hardware system is the built-in or built-out data storage area in the embedded system. For example, the above storage unit may be a RAM (Random Access Memory) and/or a ROM (Read Only Memory).

Referring to FIG. 2, a flowchart of a method for state switching according to an embodiment of the present invention is shown. This embodiment is applied for a second hardware system, the second hardware system is connected with a first hardware system, the second hardware system includes a memory unit, the memory unit has a first access state and a second access state, the memory unit is in the first access state currently, the flowchart as shown in FIG. 2 particularly includes the following steps.

In step 201, the second hardware system receives an access state switching instruction from the first hardware system.

In step 202, the memory unit of the second hardware system is switched from the first operation state to the second operation state.

The access state switching instruction received by the second hardware system is sent by the first hardware system when the first hardware system enters the second access state from the first access state.

It should be noted that, after step 202, the method may further includes: receiving, by the second hardware system, an access request for reading/writing the memory unit from the first hardware system; identifying the access state of the memory unit; performing an operation on the memory unit according to the received access request and returning an operation result, if the memory unit being in a readable and writable state; rejecting to perform the access request and returning an error information, if the memory unit being in unreadable and unwritable state. That is to say, the second hardware system may perform a respective operation according to the received access request, and returns a operation result, if the memory unit is a readable and writable state; the second hardware system does not perform the request operation, if the memory unit is in an unreadable and unwritable state, at this time, the returned error information may prompt that there is no access right, and the current state is the unreadable and unwirtable state.

It should be noted that, the first operation state of the first hardware system may be an initial stage, and the second operation state may be an applying stage. Or the first operation state of the first hardware system may be the applying stage, and the second operation state may be the initial stage. Various states included in the initial stage and the applying stage are the same as those mentioned above.

It should be noted that, the first access state may be an un-protected state, and the second access state may be a protected state. Or, the first access state may be the protected state, and the second access state may be the un-protected state. Here, the protected state refers to an unreadable and unwritable state or a readable and unwritable state, or an unreadable and writable state. The un-protected state refers to readable and writable state.

Particularly, the first access state of the memory unit of the second hardware system may be the readable and writable state, and the second access state may be the unreadable and unwritable state or the readable and unwritable state, or the unreadable and writable state, when the first operation state of the first hardware system is the initial stage, and the second operation state is the applying stage.

As another example, the first access state of the memory unit of the second hardware system may be the unreadable and unwritable state, or the readable and unwritable state, or the unreadable and writable state, and the second access state may be the readable and writable state, when the first operation state of the first hardware system is the applying stage, and the second operation state is the initial stage.

It should be noted that, the above access state switching instruction may a command, and also a signal.

It should be noted that, the above first hardware system may be connected with the second hardware system through a data passage. Particularly, the data passage may be any existing passage which can transmit data, for example, network, I2C passage and the like.

It should be noted that, the above first hardware system and second hardware system are two different electronic device respectively. For example, the first hardware system may at least have a mainboard, a CPU, a data storage area, and an electronic device of an application program used to interact with a user. The second hardware system may be an embedded system which at least comprises a portion of a built-in or built-out data storage area. The memory unit in the second hardware system is the built-in or built-out data storage area in the embedded system. For example, the above storage unit may be a RAM and/or a ROM.

Thus, the application of the method provided by the embodiments of the present invention can the security of key data can be ensured, avoid the access of key data by the malicious software, reduce implementation costs, and has a higher extensibility.

Referring to FIG. 3, a schematic diagram of state switching of a specific example is shown. In this embodiment, the first hardware system is a host which is a PC, and the second hardware system is in an EC (Embedded Controller) inside the host. In this embodiment, a security controllable ROM and/or RAM data space is provided to a main system of PC in the EC sub-system, in order to ensure the security of key data, and avoid the access of key data by the malicious software. A particular implemented procedure is as follow.

A data region having a specified size (Secure ROM Data and Secure RAM Data) is separated out of the ROM and RAM of the EC. Obviously, the memory of these data belongs to the EC sub-system, the EC also controls whether these data can be accessed by PC main system. The main system must access theses data through the two channel passage “Link Bus”. The EC may implement a related data exchange using an address mapping manner and a protocol which is appointed with the main system.

For example, all data blocks contained in the ROM and/or RAM data space in the EC are set as a “readable and writable” state, when the main system just powers on or after the main system is reset. The main system notifies EC to set the separated data area having the specified size as “an unreadable and unwritable” state, when the main system BIOS ends running and before loading the operating system (that is, the initial stage ends, and before the applying stage begins), and an access right is set as the “readable and writable” state only when resetting the main system next time. In this way, it is ensured that these data is not exposure when the main system running.

In this way, after the initial stage (i.e. BIOS running) ends, a strategy will be enabled, to make the programs in the following applying stages (such as, loading of the operating system->running of the operating system->running of the client application program) have no faith in information of the separated specified area. Thus, the software level cannot obtain the data of the specified area, and the security of key data will be improved.

The above access state switching instruction may be a command and also a signal, such as a power on signal, a reset signal, SLPx power supply state signal and the like.

That is to say, the EC may combine with a power supply signal and the other signal of the main system, for example, a power state signal and a BIOS signal from the main system, or the power state signal and application program signal from the main system, or the power state signal from the main system, the BIOS signal and the application program signal, and the right of the specified area separated according to different strategies. Of course, the right of the separated area may be the unreadable and writable state, the readable and unwriable state in addition to the readable and writable state, the unreadable and unwritable state.

An embodiment of the present invention further provides a first hardware system, referring to FIG. 4, the first hardware system is connected to a second hardware system, the first hardware system has a first operation state and a second operation state, the second hardware system comprises a memory unit, the memory unit has a first access state and a second access state, the memory unit is in the first access state currently, the first hardware system includes:

a state detecting unit 401 adapted to generate a detection result when the first hardware system entering the second operation state from the first operation state;

an instruction sending unit 402 connected with the state detecting unit, and adapted to send an access state switching instruction to the second hardware system according to the detection result,

The access state switching instruction is adapted to switch the memory unit of the second hardware system from the first access state to the second access state.

The memory unit included in the above second hardware system is a portion of a data storage area in the second hardware system.

The above first hardware system and second hardware system are two different electronic device respectively. For example, the first hardware system may at least have a mainboard, a CPU, a data storage area, and an electronic device of an application program used to interact with a user. The second hardware system may be an embedded system which at least comprises a portion of a built-in or built-out data storage area. The memory unit in the second hardware system is the built-in or built-out data storage area in the embedded system. For example, the above storage unit may be a RAM and/or a ROM.

An embodiment of the present invention further provides a second hardware system, referring to FIG. 5, the second hardware system is connected to a first hardware system, the second hardware system comprises a memory unit, the memory unit has a first access state and a second access state, the second hardware system includes:

a state converting unit 501 adapted to switch the memory unit of the second hardware system from the first access state to the second access state;

an instruction receiving unit 502 adapted to receive an access state switching instruction from the first hardware system, and notify the state converting unit of the received instruction;

The access state switching instruction received by the second hardware system is sent by the first hardware system when the first hardware system entering the second operation state from the first operation state.

The second hardware system further includes:

an access request receiving unit (not shown) adapted to receive an access request for reading/writing the memory unit from the first hardware system;

a state identifying unit (not shown) adapted to identify the access state of the memory unit, and output a identification result,

a feedback performing unit (not shown) connected with the state identifying unit, and adapted to perform an operation on the memory unit according to the received access request and return an operation result when the identification result being at a readable and writable state; and reject to perform the access request and return an error information when the identification result being at unreadable and unwritable state.

The memory included in the second hardware system is a portion of a built-in or built out data storage area in the second hardware system.

The above first hardware system and second hardware system are two different electronic device respectively. For example, the first hardware system may at least have a mainboard, a CPU, a data storage area, and an electronic device of an application program used to interact with a user. The second hardware system may be an embedded system which at least comprises a portion of a built-in or built-out data storage area. The memory unit in the second hardware system is the built-in or built-out data storage area in the embedded system. For example, the above storage unit may be a RAM and/or a ROM.

Thus, the application of the method provided by the embodiments of the present invention can the security of key data can be ensured, avoid the access of key data by the malicious software, reduce implementation costs, and has a higher extensibility.

For system embodiments, since they are similar with the method embodiments, and the description of them is simpler, related portions of them refer to the explanation of method embodiments.

Herein, terms such as “first” and “second” are only for distinguishing an entity or operation from another one, other than specifying or implying certain sequence of these entities or operations. Terms “comprise,” “include” and any variants thereof are not exclusive. That a process, method, article or device includes some elements means that such process, method, article or device may include additional or intrinsic elements other than the explicitly listed elements. The phase “including an element” does not exclude that more than one such element is included.

Based on the description of exemplary embodiments, those skilled in the art will understand that the exemplary embodiments may be implemented in a general hardware platform programmed with software, or entirely in hardware. The former implementation is preferred in most cases. The exemplary embodiments may be implemented in the form of computer software product which can be stored in some storage medium, such as ROM/RAM, magnetic disk, optical disk.

While some embodiments of the present invention have been described, it should be noted that many changes and modifications can be made by those skilled in the art without departing from the principle of the present invention. These changes and modifications are encompassed by the scope of the present invention. 

What is claimed is:
 1. A method for state switching which is applied for a first hardware system, wherein the first hardware system is connected with a second hardware system, the first hardware system has a first operation state and a second operation state, the second hardware system comprises a memory unit, the memory unit has a first access state and a second access state, the memory unit is in the first access state currently, the method comprises: sending an access state switching instruction to the second hardware system, when the first hardware system entering the second operation state from the first operation state; wherein the access state switching instruction is adapted to switch the memory unit of the second hardware system from the first access state to the second access state.
 2. The method according to claim 1, wherein, the first operation state of the first hardware system comprises an initial stage, and the second operation state comprises an applying stage; or the first operation state of the first hardware system comprises the applying stage, and the second operation state comprises the initial stage.
 3. The method according to claim 1, wherein, the first access state comprises an un-protected state, and the second access state comprises a protected state; or the first access state comprises the protected state, and the second access state comprises the un-protected state.
 4. A method for state switching which is applied for a second hardware system, wherein the second hardware system is connected with a first hardware system, the second hardware system comprises a memory unit, the memory unit has a first access state and a second access state, the memory unit is in the first access state currently, the method comprises: receiving by the second hardware system, an access state switching instruction from the first hardware system, and switching the memory unit of the second hardware system from the first operation state to the second operation state; wherein the access state switching instruction received by the second hardware system is sent by the first hardware system when the first hardware system enters the second access state from the first access state.
 5. The method according to claim 4, wherein, the first access state comprises an un-protected state, and the second access state comprises a protected state; or the first access state comprises the protected state, and the second access state comprises the un-protected state.
 6. The method according to claim 4, wherein, the first operation state of the first hardware system comprises an initial stage, and the second operation state comprises an applying stage; or the first operation state of the first hardware system comprises the applying stage, and the second operation state comprises the initial stage.
 7. The method according to claim 5, further comprises: receiving, by the second hardware system, an access request for reading/writing the memory unit from the first hardware system; identifying the access state of the memory unit, performing an operation on the memory unit according to the received access request and returning an operation result, if the memory unit being in a readable and writable state; rejecting to perform the access request and returning an error result, if the memory unit being in unreadable and unwritable state.
 8. A first hardware system connected to a second hardware system, wherein the first hardware system has a first operation state and a second operation state, the second hardware system comprises a memory unit, the memory unit has a first access state and a second access state, the memory unit is in the first access state currently, the first hardware system comprises: a state detecting unit adapted to generate a detection result when the first hardware system entering the second operation state from the first operation state; an instruction sending unit connected with the state detecting unit, and adapted to send an access state switching instruction to the second hardware system according to the detection result, wherein the access state switching instruction is adapted to switch the memory unit of the second hardware system from the first access state to the second access state.
 9. The first hardware system according to claim 8, wherein the memory unit included in the second hardware system is a portion of a data storage area in the second hardware system.
 10. A second hardware system connected to a first hardware system, the second hardware system comprises a memory unit, the memory unit has a first access state and a second access state, the second hardware system comprises: a state converting unit adapted to switch the memory unit of the second hardware system from the first access state to the second access state; an instruction receiving unit adapted to receive an access state switching instruction from the first hardware system, and notify the state converting unit of the received instruction; wherein the access state switching instruction received by the second hardware system is sent by the first hardware system when the first hardware system entering the second operation state from the first operation state.
 11. The second hardware system according to claim 8, wherein the second hardware system further comprises: an access request receiving unit adapted to receive an access request for reading/writing the memory unit from the first hardware system; a state identifying unit adapted to identify the access state of the memory unit, and output a identification result, a feedback performing unit connected with the state identifying unit, and adapted to perform an operation on the memory unit according to the received access request and return an operation result when the identification result being a readable and writable state; and reject to perform the access request and return an error information when the identification result being in unreadable and unwritable state.
 12. The second hardware system according to claim 8, wherein, the memory included in the second hardware system is a portion of built-in or built-out a data storage area in the second hardware system. 